<extend name="Base/ucmobile_base" />
<block name="body">
    <header data-am-widget="header" class="am-header am-header-default">
        <div class="am-header-left am-header-nav">
            <a href="#" class="">
                <i class="am-header-icon am-icon-home"></i>
            </a>
            <a href="#phone-link" class="">
                <i class="am-header-icon am-icon-phone"></i>
            </a>
        </div>
        <h1 class="am-header-title">个人中心</h1>
        <div class="am-header-right am-header-nav">
            <!-- <a href="{:addons_url ( 'UserCenter://UserCenter/userCenter' )}" class="">
              <i class="am-header-icon am-icon-user"></i>
            </a>
            -->
            <a href="#cart-link" class="">
                <i class="am-header-icon am-icon-shopping-cart"></i>
            </a>
            <a href="#" class=""><!--Menu icon placeholder-->
                <i class="am-header-icon "></i>
            </a>
        </div>
    </header>


    <!-- Menu -->
    <nav data-am-widget="menu" class="am-menu  am-menu-offcanvas1" data-am-menu-offcanvas>
        <a href="javascript: void(0)" class="am-menu-toggle">
            <i class="am-menu-toggle-icon am-icon-bars"></i>
        </a>
        <div class="am-offcanvas">
            <div class="am-offcanvas-bar">
                <ul class="am-menu-nav sm-block-grid-1">
                    <li class="am-parent">
                        <a href="##">公司</a>
                        <ul class="am-menu-sub am-collapse  sm-block-grid-2 ">
                            <li class="">
                                <a href="##">公司</a>
                            </li>
                            <li class="">
                                <a href="##">人物</a>
                            </li>
                            <li class="">
                                <a href="##">趋势</a>
                            </li>
                            <li class="">
                                <a href="##">投融资</a>
                            </li>
                            <li class="">
                                <a href="##">创业公司</a>
                            </li>
                            <li class="">
                                <a href="##">创业人物</a>
                            </li>
                            <li class="am-menu-nav-channel">
                                <a href="##" title="公司">进入栏目 &raquo;</a>
                            </li>
                        </ul>
                    </li>
                    <li class="am-parent">
                        <a href="##">人物</a>
                        <ul class="am-menu-sub am-collapse  sm-block-grid-3 ">
                            <li class="">
                                <a href="##">公司</a>
                            </li>
                            <li class="">
                                <a href="##">人物</a>
                            </li>
                            <li class="">
                                <a href="##">趋势</a>
                            </li>
                            <li class="">
                                <a href="##">投融资</a>
                            </li>
                            <li class="">
                                <a href="##">创业公司</a>
                            </li>
                            <li class="">
                                <a href="##">创业人物</a>
                            </li>
                        </ul>
                    </li>
                    <li class="am-parent">
                        <a href="#c3">趋势</a>
                        <ul class="am-menu-sub am-collapse am-avg-sm-4">
                            <li class="">
                                <a href="##">公司</a>
                            </li>
                            <li class="">
                                <a href="##">人物</a>
                            </li>
                            <li class="">
                                <a href="##">趋势</a>
                            </li>
                            <li class="">
                                <a href="##">投融资</a>
                            </li>
                            <li class="">
                                <a href="##">创业公司</a>
                            </li>
                            <li class="">
                                <a href="##">创业人物</a>
                            </li>
                            <li class="am-menu-nav-channel">
                                <a href="#c3" title="趋势">趋势 &raquo;</a>
                            </li>
                        </ul>
                    </li>
                    <li class="am-parent">
                        <a href="##">投融资</a>
                        <ul class="am-menu-sub am-collapse am-avg-sm-3">
                            <li class="">
                                <a href="##">公司</a>
                            </li>
                            <li class="">
                                <a href="##">人物</a>
                            </li>
                            <li class="">
                                <a href="##">趋势</a>
                            </li>
                            <li class="">
                                <a href="##">投融资</a>
                            </li>
                            <li class="">
                                <a href="##">创业公司</a>
                            </li>
                            <li class="">
                                <a href="##">创业人物</a>
                            </li>
                        </ul>
                    </li>
                    <li class="">
                        <a href="##">创业公司</a>
                    </li>
                    <li class="">
                        <a href="##">创业人物</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="am-g">

        <div class="am-panel am-panel-default">
            <div class="am-panel-bd">
                <div class="am-g">
                    <div class="am-u-sm-4">
                        <notempty name="user.headimgurl">
                            <img class="am-img-circle am-img-thumbnail" src="{$user.headimgurl}" alt="用户头像"/>
                            <else />
                            <img class="am-img-circle am-img-thumbnail" src="{:ADDON_PUBLIC_PATH}/images/head.jpg" alt="用户头像"/>
                        </notempty>
                        <br>
                        <div class="am-btn-group-stacked">
                            <eq name="user.login" value="1">
                                <a href="{:addons_url ( 'Ucuser://Ucuser/logout',array('mp_id'=>$mp_id) )}" class="am-btn am-btn-primary" >退出</a>
                                <else/>
                                <a href="{:addons_url ( 'Ucuser://Ucuser/login',array('mp_id'=>$mp_id) )}" class="am-btn am-btn-primary" >登录/注册</a>
                            </eq>
                            <a class="am-btn am-btn-primary">充值</a>
                        </div>
                    </div>
                    <div class="am-u-sm-8">
                        <div class="user-info">
                            <p class="user-info-order">

                                昵称：<strong>{$user.nickname}</strong><br>
                                积分：<strong>{$user.score1}</strong> <br>
                                余额：<strong>0</strong><br>
                                等级：<strong>Lv1 新手</strong><br>
                            </p>
                        </div>
                        <div class="user-info">
                            <p>信用信息</p>
                            <div class="am-progress am-progress-sm">
                                <div class="am-progress-bar am-progress-bar-success" style="width: 80%"></div>
                            </div>
                            <p class="user-info-order">
                                信用等级：正常<br>
                                信用积分：<strong>80</strong></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <ul class="am-nav am-nav-tabs">
            <li class="am-active"><a href="{:addons_url ( 'Ucuser://Ucuser/index',array('mp_id'=>$mp_id) )}">应用</a></li>
            <li><a href="{:addons_url ( 'Ucuser://Ucuser/userMessage',array('mp_id'=>$mp_id) )}">消息</a></li>
            <li><a href="{:addons_url ( 'Ucuser://Ucuser/profile',array('mp_id'=>$mp_id) )}">资料</a></li>
            <li><a href="#">群组</a></li>
            <li><a href="#">关注</a></li>
        </ul>

        <section class="am-panel am-panel-default">
            <div class="am-panel-hd">应用列表</div>
            <ul class="am-list blog-list">
                <li><a href="#">会员卡</a></li>
                <li><a href="#">优惠券</a></li>
                <li><a href="#">我的预约</a></li>
                <li><a href="#">订单</a></li>
                <li><a href="#">充值记录</a></li>
                <li><a href="#">我的活动</a></li>
                <li><a href="#">微名片</a></li>
            </ul>
        </section>





    </div>


    <!-- Navbar -->
    <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
         id="">
        <ul class="am-navbar-nav am-cf am-avg-sm-4">
            <li data-am-navbar-share>
                <a href="#">
                    <span class="am-icon-share-square-o"></span>
                    <span class="am-navbar-label">分享</span>
                </a>
            </li>
            <li data-am-navbar-qrcode>
                <a href="#">
                    <span class="am-icon-qrcode"></span>
                    <span class="am-navbar-label">二维码</span>
                </a>
            </li>
            <li>
                <a href="http://git.oschina.net/uctoo/uctoo">
                    <span class="am-icon-github"></span>
                    <span class="am-navbar-label">GitHub</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <span class="am-icon-download"></span>
                    <span class="am-navbar-label">下载使用</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <span class="am-icon-location-arrow"></span>
                    <span class="am-navbar-label">Bug 反馈</span>
                </a>
            </li>
        </ul>
    </div>
</block><!--body end -->
<block name="script">
    <script type="text/javascript">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"> </script>

  <script>
    wx.config({
      debug: false,
      appId: '{$js_sign['appid']}',
      timestamp: {$js_sign['timestamp']},
      nonceStr: '{$js_sign['noncestr']}',
      signature: '{$js_sign['signature']}',
      jsApiList: [
        // 所有要调用的 API 都要加到这个列表中
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareQQ',
        'onMenuShareWeibo'
      ]
    });
	
	wx.ready(function () {
      // 在这里调用 API
	 
  // 2. 分享接口
  // 2.1 监听“分享给朋友”，按钮点击、自定义分享内容及分享结果接口
  
    wx.onMenuShareAppMessage({
      title: '微会员',
      desc: '微会员，用户中心。',
      link: '{$share_url}',
      imgUrl: '{:get_addoncover_url( "Ucuser" )}',
      trigger: function (res) {

          // 用户确认分享后执行的回调函数
      },
      success: function (res) {

          // 用户确认分享后执行的回调函数
      },
      cancel: function (res) {

          // 用户取消分享后执行的回调函数
      },
      fail:function (res) {

      }
    });
    

  // 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
 
    wx.onMenuShareTimeline({
      title: '微会员',
      desc: '微会员，用户中心。',
      link: '{$share_url}',
      imgUrl: '{:get_addoncover_url( "Ucuser" )}',
      trigger: function (res) {

            // 用户确认分享后执行的回调函数
        },
        success: function (res) {

            // 用户确认分享后执行的回调函数
        },
        cancel: function (res) {

            // 用户取消分享后执行的回调函数
        },
        fail:function (res) {

        }
    });
    

  // 2.3 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口
  
    wx.onMenuShareQQ({
      title: '微会员',
      desc: '微会员，用户中心。',
      link: '{$share_url}',
      imgUrl: '{:get_addoncover_url( "Ucuser" )}',
      trigger: function (res) {

          // 用户确认分享后执行的回调函数
      },
      success: function (res) {

          // 用户确认分享后执行的回调函数
      },
      cancel: function (res) {

          // 用户取消分享后执行的回调函数
      },
      fail:function (res) {

      }
    });
    
  
  // 2.4 监听“分享到微博”按钮点击、自定义分享内容及分享结果接口
  
    wx.onMenuShareWeibo({
      title: '微会员',
      desc: '微会员，用户中心。',
      link: '{$share_url}',
      imgUrl: '{:get_addoncover_url( "Ucuser" )}',
      trigger: function (res) {

            // 用户确认分享后执行的回调函数
        },
        success: function (res) {

            // 用户确认分享后执行的回调函数
        },
        cancel: function (res) {

            // 用户取消分享后执行的回调函数
        },
        fail:function (res) {

        }
    });
    
});
    wx.error(function (res) {
      alert(res.errMsg);
    });
    </script>
</block>
